package controlador;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.SwingUtilities;

import vista.JFFraseAvanzada;
import vista.JFPrincipal;

public class ControladorJFPrincipal implements ActionListener{
	private JFPrincipal ventanaPrincipal;
	private String nombre;
	public ControladorJFPrincipal(String nombre) {
	
	}

	public ControladorJFPrincipal() {
		super();
		this.ventanaPrincipal=new JFPrincipal();
		this.ventanaPrincipal.addListener(this);
		this.ventanaPrincipal.setLocationRelativeTo(null);
		this.ventanaPrincipal.setVisible(true);
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		String actionCommand = e.getActionCommand();
		
		if (actionCommand.equals("J U G A R")){
			
			new ControladorJFNivel();
		}
		else if(actionCommand.equals("Nivel Basico")){
			new ControladorJFListado();
		}
		else if(actionCommand.equals("Nivel Intermedio")){
			new ControladorJFListado2();
		}
		else if(actionCommand.equals("Nivel Avanzado")){
			new ControladorJFListado3();
		}
		
		else if(actionCommand.equals("Frase Basica")){
			new ControladorJFFraseBasico();
		}
		else if(actionCommand.equals("Frase Intermedia")){
			new ControladorJFFraseIntermedio();
		}
		else if(actionCommand.equals("Frase Avanzada")){
			new ControladorJFFraseAvanzada();
		}
	}
}
